package org.lq.shopping.service.impl;

import java.sql.Date;
import java.util.List;

import org.lq.shopping.dao.ShopOrderDao;
import org.lq.shopping.dao.impl.ShopOrderDaoImpl;
import org.lq.shopping.entity.ShopOrder;
import org.lq.shopping.service.ShopOrderService;

public class ShopOrderServiceImpl implements ShopOrderService {

	ShopOrderDao sdao=new ShopOrderDaoImpl(); 
	@Override
	public boolean addOrder(ShopOrder order) {
		return sdao.add(order)>0;
	}

	@Override
	public List<ShopOrder> findPage(int pageIndex, int pageSize) {
		return sdao.findPage(pageIndex, pageSize);
	}

	@Override
	public List<ShopOrder> findPageByTime(Date startTime, Date endTime, int pageIndex, int pageSize) {
		
		return sdao.findPageByTime(startTime, endTime, pageIndex, pageSize);
	}

	@Override
	public List<ShopOrder> findPageByStatus(String status, int pageIndex, int pageSize) {
		
		return sdao.findPageByStatus(status, pageIndex, pageSize);
	}

	@Override
	public int getStatus(int userId, String status) {
		return sdao.getStatus(userId, status);
	}

}
